project(OCCTOverview)

include_directories(./include ./code)
aux_source_directory(./src SRC_LIST)
file(GLOB_RECURSE SRC_LIST1 "./code/*.cxx" )
file(GLOB_RECURSE QT_MOC "include/*.h" "code/*.h" "*.qrc")

add_executable(${PROJECT_NAME} ${SRC_LIST} ${SRC_LIST1} ${QT_MOC}) 

target_link_libraries(
        ${PROJECT_NAME}
        Qt6::Core 
        Qt6::Widgets
        Qt6::Gui 
		Qt6::Xml
        # ${VTK_LIBRARIES}
        ${OpenCASCADE_LIBRARIES}
        )

# vtk_module_autoinit(TARGETS ${PROJECT_NAME} MODULES ${VTK_LIBRARIES})

file(GLOB_RECURSE QT_PLATFORMS "C:/Qt/6.6.3/msvc2019_64/plugins/platforms/*.dll")
install(FILES ${QT_PLATFORMS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/platforms)
file(GLOB_RECURSE QT_IMAGEFORMATS "C:/Qt/6.6.3/msvc2019_64/plugins/imageformats/*.dll")
install(FILES ${QT_IMAGEFORMATS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/imageformats)
file(GLOB_RECURSE QT_STYLES "C:/Qt/6.6.3/msvc2019_64/plugins/styles/*.dll")
install(FILES ${QT_STYLES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/styles)